<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>octant.grid.Focus</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="octant-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="octant-module.html">Package&nbsp;octant</a> ::
        <a href="octant.grid-module.html">Module&nbsp;grid</a> ::
        Class&nbsp;Focus
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
      </table>
    </td>
  </tr>
</table>
<!-- ==================== TYPE DESCRIPTION ==================== -->
<h1 class="epydoc">type Focus</h1><p class="nomargin-top"><span class="codelink"><a href="octant.grid-pysrc.html#Focus">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Focus</strong>
</pre>

<hr />
<p>Return a container for a sequence of Focus objects</p>
<p>foc = Focus()</p>
<p>The sequence is populated by using the 'add_focus_x' and 'add_focus_y'
methods. These methods define a point ('xo' or 'yo'), around witch to
focus, a focusing factor of 'focus', and x and y extent of focusing given
by Rx or Ry. The region of focusing will be approximately Gausian, and the
resolution will be increased by approximately the value of factor.</p>
<div class="rst-section">
<h1 class="heading"><a id="rst-methods" name="rst-methods">Methods</a></h1>
<p>foc.add_focus_x(xo, factor=2.0, Rx=0.1)
foc.add_focus_y(yo, factor=2.0, Ry=0.1)</p>
<dl class="rst-docutils">
<dt>Calls to the object return transformed coordinates:</dt>
<dd>xf, yf = foc(x, y)</dd>
</dl>
<p>where x and y must be within [0, 1], and are typically a uniform,
normalized grid. The focused grid will be the result of applying each of
the focus elements in the sequence they are added to the series.</p>
</div>
<div class="rst-section">
<h1 class="heading"><a id="rst-examples" name="rst-examples">EXAMPLES</a></h1>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>foc = octant.grid.Focus()
<span class="py-prompt">&gt;&gt;&gt; </span>foc.add_focus_x(0.2, factor=3.0, Rx=0.2)
<span class="py-prompt">&gt;&gt;&gt; </span>foc.add_focus_y(0.6, factor=5.0, Ry=0.35)</pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>x, y = np.mgrid[0:1:3j,0:1:3j]
<span class="py-prompt">&gt;&gt;&gt; </span>xf, yf = foc(x, y)</pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> xf
<span class="py-output">[[ 0.          0.          0.        ]</span>
<span class="py-output"> [ 0.36594617  0.36594617  0.36594617]</span>
<span class="py-output"> [ 1.          1.          1.        ]]</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> yf
<span class="py-output">[[ 0.          0.62479833  1.        ]</span>
<span class="py-output"> [ 0.          0.62479833  1.        ]</span>
<span class="py-output"> [ 0.          0.62479833  1.        ]]</span></pre>
</div>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Instance Methods</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      docstring for __call__</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="octant.grid-pysrc.html#Focus.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="octant.grid.Focus-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="octant.grid-pysrc.html#Focus.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="add_focus_x"></a><span class="summary-sig-name">add_focus_x</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">xo</span>,
        <span class="summary-sig-arg">factor</span>=<span class="summary-sig-default">2.0</span>,
        <span class="summary-sig-arg">Rx</span>=<span class="summary-sig-default">0.1</span>)</span><br />
      docstring for add_point</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="octant.grid-pysrc.html#Focus.add_focus_x">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="add_focus_y"></a><span class="summary-sig-name">add_focus_y</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">yo</span>,
        <span class="summary-sig-arg">factor</span>=<span class="summary-sig-default">2.0</span>,
        <span class="summary-sig-arg">Ry</span>=<span class="summary-sig-default">0.1</span>)</span><br />
      docstring for add_point</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="octant.grid-pysrc.html#Focus.add_focus_y">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Method Details</span></td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="octant.grid-pysrc.html#Focus.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  
  <dl class="fields">
    <dt>Overrides:
        object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="octant-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1
    on Mon Apr 20 11:56:30 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
